#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>

void check_lenth(char str[]) {
    int max_len = 0, cur_len = 0;
    int start = 0, max_start = 0;
    int i = 0;
    while (str[i]) {
        if (isalpha(str[i])) {
            if (cur_len == 0) start = i;
            cur_len++;
        } else {
            if (cur_len > max_len) {
                max_len = cur_len;
                max_start = start;
            }
            cur_len = 0;
        }
        i++;
    }
    if (cur_len > max_len) {
        max_len = cur_len;
        max_start = start;
    }
    for (i = 0; i < max_len; i++) {
        putchar(str[max_start + i]);
    }
    putchar('\n');
}

int main() {
    char str[1000];
    fgets(str, 1000, stdin);
    check_lenth(str);
    return 0;
}